Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add enterprise features #34

Merged
merged 27 commits into from
Oct 4, 2024
Merged

Add enterprise features #34

merged 27 commits into from
Oct 4, 2024

Conversation

mattgallagher92
Copy link
Member

This PR is a reworking of #32, with some additions to docs etc. The branch has the code structured as we would prefer and the demo still runs correctly with the community features. Thoughts appreciated @JordanMarr 🙂

The enterprise features still need testing, and this PR will remain in draft until we have tested them.

@mattgallagher92
Copy link
Member Author

@JordanMarr do you have a preferred way to import and register the enterprise modules? I guess we either need to add a mechanism for doing that, or document how users can do that in their own code.

@JordanMarr
Copy link
Contributor

JordanMarr commented Jul 29, 2024

I did the following to setup enterprise features:

  1. Loaded the following in package.json:
    "ag-grid-community": "^31.3.2",
    "ag-grid-enterprise": "^31.3.2",
    "ag-grid-react": "^31.3.2",

NOTE: The ag-grid documentation stated that both community and enterprise packages need to be loaded.
I'm not sure if that's true, but I did it anyway per the docs.

  1. Manually loaded ag-grid-enterprise, base css and a css theme.
open Fable.Core.JsInterop

// AG Grid
importSideEffects "ag-grid-enterprise"
importSideEffects "ag-grid-enterprise/styles/ag-grid.css"
importSideEffects "ag-grid-enterprise/styles/ag-theme-balham.css"
//importSideEffects "ag-grid-enterprise/styles/ag-theme-alpine.css"
//importSideEffects "ag-grid-enterprise/styles/ag-theme-material.css"

I suppose you could create a helper functions for each of these.
But since it is pretty common to import a related css file, I think this part should just be in your docs for setup.

@Larocceau
Copy link
Contributor

Larocceau commented Aug 30, 2024

Checklist for test:
IGridApi<'row>

  • abstract copyToClipboard: unit -> unit
  • abstract pasteFromClipboard: unit -> unit
  • abstract refreshCells: unit -> unit
  • abstract redrawRows: unit -> unit
  • abstract setGridOption: string -> obj -> unit
  • abstract getSelectedNodes: unit -> IRowNode<'row>[]
  • abstract getCellRanges: unit -> ICellRange[]

ColumnDef<'row>

  • static member inline filter(v: RowFilter) = columnDefProp<'row, 'value> ("filter" ==> v.FilterText)
  • static member cellEditor(v: AgCellEditor) = columnDefProp<'row, 'value> ("cellEditor" ==> v.RichCellEditorText)
  • static member inline pivot(v: bool) = columnDefProp<'row, 'value> ("pivot" ==> v)
  • static member inline aggFunc(v: AggregateFunction) = columnDefProp<'row, 'value> ("aggFunc" ==> v.AggregateText)
  • static member inline rowGroup(v: bool) = columnDefProp<'row, 'value> ("rowGroup" ==> v)

AgGrid<'row>

  • static member inline rowGroupPanelShow(v: RowGroupPanelShow) =
  • static member inline groupDisplayType(v: RowGroupingDisplayType) =
  • static member inline pivotMode(v: bool) = agGridProp<'row> ("pivotMode", v)
  • static member inline treeData(v: bool) = agGridProp<'row> ("treeData", v)
  • static member inline getContextMenuItems(callback: int -> int -> MenuItem list)

src/AgGrid.fs Outdated Show resolved Hide resolved
@Larocceau Larocceau marked this pull request as ready for review October 4, 2024 09:57
@Larocceau Larocceau self-requested a review October 4, 2024 09:58
@Larocceau Larocceau mentioned this pull request Oct 4, 2024
@jwthomson jwthomson self-requested a review October 4, 2024 10:22
@Larocceau Larocceau merged commit 04b93ff into main Oct 4, 2024
1 check passed
@mattgallagher92 mattgallagher92 deleted the JordanMarr/main branch October 8, 2024 10:08
@jwthomson jwthomson mentioned this pull request Nov 1, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants